package com.huxun.service.Impl;

import com.huxun.bean.Foodtype;
import com.huxun.mapper.FoodTypeMapper;
import com.huxun.service.FoodTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FoodTypeServiceImpl implements FoodTypeService {
    @Autowired
    FoodTypeMapper foodTypeMapper;
    @Override
    public int addFoodType(Foodtype foodtype) {
        return foodTypeMapper.addFoodType(foodtype);
    }

    @Override
    public int deleteFoodType(int id) {
        return foodTypeMapper.deleteFoodType(id);
    }

    @Override
    public int updateFoodType(Foodtype foodtype) {
        return foodTypeMapper.updateFoodType(foodtype);
    }

    @Override
    public List<Foodtype> getFoodTypes(Foodtype foodtype) {
        return foodTypeMapper.getFoodTypes(foodtype);
    }

    @Override
    public Foodtype getById(int id) {
        return foodTypeMapper.getById(id);
    }

    @Override
    public List<Foodtype> getAllFoodTypes() {
        return foodTypeMapper.getAllFoodTypes();
    }
}
